home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
docs
/
winer
/
peekpoke.asm
< prev
next >
Wrap
Assembly Source File
|
1992-05-13
|
610b
|
28 lines
;PEEKPOKE.ASM, simplifies access to full words
;Copyright (c) 1991 Ethan Winer
.Model Medium, Basic
.Code
PeekWord Proc Uses ES, SegAddr:DWord
Les BX,SegAddr ;load the segment and address
Mov AX,ES:[BX] ;read the word into AX
Ret ;return to BASIC
PeekWord Endp
PokeWord Proc Uses ES, SegAddr:DWord, Value:Word
Les BX,SegAddr ;load the segment and address
Mov AX,Value ;and the new value to store there
Mov ES:[BX],AX ;write the value into memory
Ret ;return to BASIC
PokeWord Endp
End